package com.yang.springcloud.alibaba.service.impl;

import com.yang.springcloud.alibaba.dao.StorageDao;
import com.yang.springcloud.alibaba.service.StorageService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @Author yang
 * @Date 2022/8/29
 */
@Service
@Slf4j
public class StorageServiceImpl implements StorageService {

    @Resource
    private StorageDao storageDao;
    @Override
    public void decrease(Long productId, Integer count) {
        log.info("-------storage-service 扣减库存开始-------");
        storageDao.decrease(productId,count);
        log.info("-------storage-service 扣减库存结束-------");
    }
}
